package Demo1;

import java.util.Scanner;

public class Main5 {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        String str =  in.nextLine();
        if(str.length() == 0) return;
        if(!Character.isUpperCase(str.charAt(0))) {
            System.out.println(Character.toUpperCase(str.charAt(0)));
        }else {
            System.out.print(str.charAt(0));
        }
        for(int i = 1; i < str.length(); i++) {
            char c = str.charAt(i);
            if(c == ' ') {
                char ch = str.charAt(i+1);
                if(!Character.isUpperCase(ch)) {
                    ch = Character.toUpperCase(ch);
                }
                System.out.print(ch);
            }
        }
    }
}